<div class="jobs view">
<div class="widget" id="widget_job_view" style="width: 96%">
    <div class="toggle">&nbsp;</div>
    <h3 class="handle"><?php __('View Job');?></h3>
    <div class="content">
        <div class="table">
            <table class="view">
                <tr>
                    <td class="title" colspan="4"><?php __('Basic Information'); ?></td>
                </tr>
                <tr>
                    <td class="key"><?php __('Job Title'); ?></td>
                    <td class="value"><?php e($job['Job']['title']); ?></td>
                    <td class="key"><?php __('Job Workplace'); ?></td>
                    <td class="value"><?php e($job['Job']['workplace']); ?></td>
                </tr>
                <tr>
                    <td class="key"><?php __('Published'); ?></td>
                    <td class="value"><?php e($job['Job']['created']); ?></td>
                    <td class="key"><?php __('Owner Company'); ?></td>
                    <td class="value"><?php e($html->link($job['Company']['name'], array(
                            'controller'=>'companies',
                            'action'=>'view',
                            $job['Company']['id']
                        ))); ?></td>
                </tr>
                <tr>
                    <td class="key"><?php __('Student Count'); ?></td>
                    <td class="value" colspan="3"><?php e($job['Job']['students_job_count']); ?></td>
                </tr>
                <tr>
                    <td class="title" colspan="4"><?php __('Detail Information'); ?></td>
                </tr>
                <tr>
                    <td class="key"><?php __('Job Introduction'); ?></td>
                    <td class="value" style="width: 80%" colspan="3"><?php e($job['Job']['introduction']); ?></td>
                </tr>
                <tr>
                    <td class="key"><?php __('Job Requirement'); ?></td>
                    <td class="value" style="width: 80%" colspan="3"><?php e($job['Job']['requirement']); ?></td>
                </tr>
            </table>
            <div class="actions">
                <ul>
                <?php if($user['group'] != 'student'): ?>
                    <li><?php echo $html->link(__('Edit Job', true), array('action' => 'edit', $job['Job']['id'])); ?> </li>
                    <li><?php echo $html->link(__('Delete Job', true), array('action' => 'delete', $job['Job']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $job['Job']['id'])); ?> </li>
                    <li><?php echo $html->link(__('List Jobs', true), array('action' => 'index')); ?> </li>
                    <li><?php echo $html->link(__('New Job', true), array('action' => 'add')); ?> </li>
                <?php else: ?>
                    <li><?php echo $html->link(
                        __('Apply This Job', true),
                        array(
                            'controller'=>'students_jobs',
                            'action' => 'add',
                            $job['Job']['id']
                        ),
                        array(
                            'title' => __('Click to apply for this job', true),
                            'id' => 'link_apply_for_the_job'
                        )); ?>
                    </li>
                    <!-- Script for ajax job apply -->
                    <script type="text/javascript">
                        jQuery(function(){
                            // Apply for the job through ajax
                            $('a#link_apply_for_the_job').click($.sme.cbk.ajaxApply);
                        });
                    </script>
                <?php endif; ?>
                <br class="clear"/><br class="clear"/>
                </ul>
            </div>
        </div>
    </div>
</div>
</div>